package org.logan.sample.web.base.engine;

import org.logan.sample.base.boot.AbstractContextLoaderListener;

/**
 * 自定义 ContextLoaderListener
 * 
 * @author xulongjun 2015-10-30
 * @qq 425018553
 */
public class MyContextLoaderListener extends AbstractContextLoaderListener {
    public String getCallName() {
        return "sample_web";
    }

    public void onStartupSuccess() {
        WebSampleInit mobileApiInit = MyContextLoaderListener.getCurrentWebApplicationContext().getBean(WebSampleInit.class);
        mobileApiInit.eventManager.onStartupSuccess();
    }

    public void onStartupFailed(String errorMessage) {
        WebSampleInit mobileApiInit = MyContextLoaderListener.getCurrentWebApplicationContext().getBean(WebSampleInit.class);
        mobileApiInit.eventManager.onStartupFailed(errorMessage);
        ;
    }
}
